﻿@model System_Role
@{
    ViewBag.Title = "RoleEdit";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<div class="main-container">
    <div class="modal-form">
        <div class="modal-form-body">
            <form id="Form" method="post" class="form-horizontal margin10-t">
                @Html.HiddenFor(m => Model.ID)
                <div class="contrl">
                    <label>角色名称</label>
                    <input type="text" class="input" value="@Model.Role_Name" name="Role_Name">
                </div>
                <div class="contrl">
                    <label>角色序号</label>
                    <input type="text" class="input" name="Role_Order" value="@Model.Role_Order">
                </div>
                <div class="contrl">
                    <label>备注说明</label>
                    <textarea name="Remark" class="input-big" rows="4">@Model.Remark</textarea>
                </div>
            </form>
        </div>
        <div class="modal-form-footer">
            <input type="button" class="btn-primary" value="保存" onclick="EditSubmit('System', 'RoleEdit', 'RoleList')" />
            <input type="button" class="btn-secondary" value="取消" onclick="CloseModelFrame()">
        </div>
    </div>
</div>
<script type="text/javascript">
    //验证字段
    $(document).ready(function () {
        $("#Form").validate({
            rules: {
                Role_Name: { required: true, maxlength: 50 },
                Remark: { maxlength: 300 }
            },
            messages: {
                Role_Name: {
                    required: "请输入角色名称",
                    maxlength: "角色长度最多50字"
                },
                Remark: {
                    maxlength: "长度最多300字"
                }
            },
            errorElement: "em"
        });
    });
</script>
